package ltd.followkba.comment.edit;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.EditText;

import ltd.advskin.base.SkinActivity;
import ltd.followkba.R;
import ltd.followkba.comment.MUTIL;

import static ltd.advskin.MSKIN.MSTRING;

//public class SendGiftActivity extends SkinActivity {
//    private Context mContext;
//    private int g4AppType;
//    private EditText evSendStatus;
////    private int g4GiftComment;
////    private int g4GiftListen;
////    private ThreadSendGift mThreadSendGift;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_send_gift);
//        mContext = this;
//
//        evSendStatus = (EditText)findViewById(R.id.evSendStatus);
//        findViewById(R.id.ivPublicReturn).setOnClickListener(onClickListener);
//        findViewById(R.id.btStopSend).setOnClickListener(onClickListener);
//        findViewById(R.id.Sendding).setOnClickListener(onClickListener);
////        MSTRING("aSongInfo " + mUserSongFile.GetSelectIndex() + " " + mUserSongFile.GetSelectInfoID() + " " + aSongInfo.WorksName);
////        gsLocal_1 = String.format("花：%d，评论：%d，试听：%d 给%s -> %s", g4GiftFlower, g4GiftComment, g4GiftListen, aUserInfo.UserName, aSongInfo.WorksName);
////        Toast.makeText(MBAPP.mActivity, gsLocal_1, Toast.LENGTH_LONG).show();
//
//
//    }
//    private View.OnClickListener onClickListener = new View.OnClickListener() {
//        @Override
//        public void onClick(View view) {
//            String gsLocal_1;
//            switch (view.getId()) {
//                case R.id.ivPublicReturn:
//                    finish();
//                break;
//                case R.id.btStopSend:
//                    break;
//                case R.id.Sendding:
//                    Intent intent = getIntent();
//                    g4AppType = intent.getIntExtra("AppType", 1);
//                    final int g4GiftFlower = intent.getIntExtra("g4GiftFlower", 0);
//                    final int g4GiftComment = intent.getIntExtra("g4GiftComment", 0);
//                    final int g4GiftListen = intent.getIntExtra("g4GiftListen", 0);
//                    final int g4GiftShare = intent.getIntExtra("g4GiftShare", 0);
//                    final String userID = intent.getStringExtra("UserIdS");
//                    final String songID = intent.getStringExtra("IdS");
////                    mThreadSendGift = new ThreadSendGift(g4GiftFlower, g4GiftComment, g4GiftListen, UserIdS, IdS);
////                    mThreadSendGift.execute((Void[]) null);
//
//                    Runnable runnable = new Runnable() {
//                        public void run() {
//                            ThreadSendGift(g4GiftFlower, g4GiftComment, g4GiftListen, g4GiftShare, userID, songID);
//                        }
//                    };
//                    Thread thread = new Thread(runnable);
//                    thread.start();
//
//                    break;
//            }
//        }
//    };
//    public void ThreadSendGift(int flower, int comment, int listen, int share, String userID, String songID){
////        final AUserInfo aUserInfo = (AUserInfo)infoFile.GetInfoFromFile(UserIdS);
////        final ASongInfo aSongInfo = (ASongInfo)mUserSongFile.GetInfoFromFile(mUserSongFile.GetSelectInfoID());
//
////        ArrayList<String> accounts = MKCS.GetTaskAccountList(g4AppType);
////        int g4Local_1 = 0;
////        int g4Local_2 = 0;
////        int g4Local_3 = 0;
////        int g4Local_4 = 0;
////        int g4Local_5 = 0;
////MSTRING("小号总数 "+accounts.size()+" "+flower+" "+comment+" "+listen+" "+share+" "+UserIdS+" "+IdS);
////        int g4Local_6 = accounts.size();
////        g4Local_6 = (flower * g4Local_6) + (comment * g4Local_6) + (listen * g4Local_6) + (share * g4Local_6);
////        while (g4Local_1 < g4Local_6){
////            if (g4Local_2 < flower){
////                ShowSendStep("g4Local_2 "+g4Local_2);
////                ++g4Local_2;
////            }
////            if (g4Local_3 < comment){
////                ShowSendStep("g4Local_3 "+g4Local_3);
////                ++g4Local_3;
////            }
////            if (g4Local_4 < listen){
////                ShowSendStep("g4Local_4 "+g4Local_4);
////                ++g4Local_4;
////            }
////            if (g4Local_5 < share){
////                ShowSendStep("g4Local_5 "+g4Local_4);
////                ++g4Local_5;
////            }
////            ++g4Local_1;
////            MAPI.MSLEEP(2000);
////        }
//        MSTRING("完成 " );
//    }
//
//    private Handler handler = new Handler(){
//
//        public void handleMessage(Message msg){
//            if (msg.what == 1){
//                String gsLocal_1 = msg.getData().getString("t1");
//                String gsLocal_2 = MUTIL.SHOW_DATE_FORMAT(3, System.currentTimeMillis()/1000) + " ";
//                String gsLocal_3 = evSendStatus.getText().toString();
//                evSendStatus.setText(gsLocal_3+"\r\n"+gsLocal_2 + gsLocal_1);
//            }
//        }
//    };
//    public void ShowSendStep(String string){
//        Message message = new Message();
//        message.what = 1;
//        Bundle bundle = new Bundle();
//        bundle.putString("t1", string);  // 往Bundle中存放数据
//        bundle.putString("t2", string);  // 往Bundle中存放数据
//        message.setData(bundle);
//        handler.sendMessage(message);
//
////        final String showString = string;
////        runOnUiThread(new Runnable() {
////            @Override
////            public void run() {
//
////                String gsLocal_1 = MUTIL.SHOW_DATE_FORMAT(1, System.currentTimeMillis()/1000) + " ";
////                String gsLocal_2 = tvSendStatus.getText().toString();
////                tvSendStatus.setText(gsLocal_1+"\r\n"+gsLocal_1 + showString);
////MBAPP.MSTRING("ShowSendStep " + gsLocal_1 + showString);
////            }
////        });
//    }
//
//
////    private class ThreadSendGift extends AsyncTask<Void, Void, Boolean>   {
////        private int g4GiftFlower;
////        private int g4GiftComment;
////        private int g4GiftListen;
////        private String gsUserID;
////        private String gsSongID;
////
////        public ThreadSendGift(int flower, int comment, int Listen, String UserIdS, String IdS){
////            g4GiftFlower = flower;
////            g4GiftComment = comment;
////            g4GiftListen = Listen;
////            gsUserID = UserIdS;
////            gsSongID = IdS;
////        }
////        @Override
////        protected Boolean doInBackground(Void... params) {
////            int g4Local_1 = 0;
////            while (g4Local_1 < 100){
////                MAPI.MSLEEP(1000);
////                publishProgress(" ", " ", 5);
////                ++g4Local_1;
////            }
////            return true;
////        }
////        @Override
////        protected void onPostExecute(Boolean success) {
////        }
////        @Override
////        protected void onCancelled() {
////        }
////    }
//
//}
